package design.factory;

public class CarFactory{
    public Car getCar(String key) {
        if ("五菱".equals(key)) {
            return new Wuling();
        } else if ("特斯拉".equals(key)) {
            return new Tesile();
        }
        return null;
    }
}